package com.hn.dao;

import com.hn.mapper.BdMapMapper;
import com.hn.pojo.BdMap;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

/**
 * @作者 : wangchangdian
 * @创建时间 : 2019/5/15 - 1:41
 */
@Repository("bdMapDao")
public class BdMapDao {
    @Resource
    BdMapMapper bdMapMapper;

    public void saveMap(BdMap bdMap){
        bdMapMapper.saveMap(bdMap);
    }

    public List<BdMap> getMapCover(){
       return bdMapMapper.getMapCover();
    }

    /**
     * 根据索引查询多边形
     */
   public BdMap findCoverByIndex(String Coveroord){
       return bdMapMapper.findCoverByIndex(Coveroord);
   }

    /**
     * 删除一个覆盖物
     */
   public void deleCoverByIndex(String Coveroord){
       bdMapMapper.deleCoverByIndex(Coveroord);
   }


    /**
     * 根据坐标数组修改一个覆盖物
     */
    public void editCoverByIndex(BdMap bdMap){
        bdMapMapper.editCoverByIndex(bdMap);
    }

}
